function HandleDialogTag(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  
  this._createElements();
};

HandleDialogTag.prototype._createElements = function() {
  var _self = this;

  this._gui.system.checked = true;
  this._item._tag = '客片';
  this._gui.system.onclick = function() { _self._item._tag = '客片';
                                          _self._gui.text.value = '';
                                        };
  this._gui.sample.onclick = function() { _self._item._tag = '样片';
                                          _self._gui.text.value = '';
                                        };
  if (this._item && this._item.tag == '样片') {
    this._gui.sample.checked = true;
    this._item._tag = this._item.tag;
  }
  
  this._gui.custom.onclick = function() { _self._item._tag = _self._gui.text.value; };
  this._gui.text.onclick = function() { _self._gui.custom.click();
                                        this.focus();
                                      };
  this._gui.text.onchange = function() { _self._item._tag = this.value; };
  if (this._item && this._item.tag != '客片' && this._item.tag != '样片' && this._item.tag != '') {
    this._gui.custom.checked = true;
    this._gui.text.value = this._item.tag;
    this._item._tag = this._item.tag;
  }
};